Micron Document
πŸŽ–οΈGitΠ―Ρ€Π°πŸŽ–οΈ

Node / meshtastic / Meshtastic-Android / files / .github / agents / speckit.brownfield.scan.agent.md

Displaying Raw β€’ View rendered β€’ Download

.github/agents/speckit.brownfield.scan.agent.md b307ceb5c24b98fa5c8a49fdf95e56eeaa4187bb (b307ceb5) Text, 5.53 KB

---
description: Auto-discover project structure, tech stack, frameworks, and architecture
Tc9d1d9 patterns
Tc9d1d9---


<!-- Extension: brownfield -->
<!-- Config: .specify/extensions/brownfield/ -->
Tc9d1d9# Scan Project

Analyze an existing codebase to discover its technology stack, architecture patterns, module structure, and coding conventions. This produces a project profile that the bootstrap command uses to generate tailored spec-kit configuration.

Tc9d1d9## User Input

Ta5d6ff```Ta5d6fftext
$ARGUMENTS
Ta5d6ff```

You **MUST** consider the user input before proceeding (if not empty). The user may specify a subdirectory to scan (e.g., "backend/"), a focus area (e.g., "only frontend"), or request a specific depth of analysis.

Tc9d1d9## Prerequisites

Tff7b721. Verify the current directory is a git repository
Tff7b722. Verify this is an existing project with source code (not an empty repo)

Tc9d1d9## Outline

Tff7b721. **Detect tech stack**: Identify languages, frameworks, and tools by scanning:

| Signal | What to Check |
|--------|--------------|
| **Languages** | File extensions (Ta5d6ff`.py`, Ta5d6ff`.ts`, Ta5d6ff`.go`, Ta5d6ff`.java`, Ta5d6ff`.rs`, etc.) and their relative proportions |
| **Package managers** | Ta5d6ff`package.json`, Ta5d6ff`requirements.txt`, Ta5d6ff`pyproject.toml`, Ta5d6ff`go.mod`, Ta5d6ff`Cargo.toml`, Ta5d6ff`pom.xml`, Ta5d6ff`build.gradle` |
| **Frameworks** | Dependencies in package files (React, Django, Spring, Express, Rails, etc.) |
| **Build tools** | Ta5d6ff`Makefile`, Ta5d6ff`webpack.config.js`, Ta5d6ff`vite.config.ts`, Ta5d6ff`Dockerfile`, Ta5d6ff`docker-compose.yml` |
| **CI/CD** | Ta5d6ff`.github/workflows/`, Ta5d6ff`.gitlab-ci.yml`, Ta5d6ff`.circleci/`, Ta5d6ff`Jenkinsfile` |
| **Testing** | Test directories, test frameworks in dependencies (Ta5d6ff`jest`, Ta5d6ff`pytest`, Ta5d6ff`go test`, Ta5d6ff`JUnit`) |

Tff7b722. **Analyze architecture**: Identify the project's structural patterns:

| Pattern | Indicators |
|---------|-----------|
| **Monolith** | Single source tree, one entry point, shared database config |
| **Monorepo** | Multiple Ta5d6ff`package.json`/Ta5d6ff`go.mod` files, workspace config, Ta5d6ff`packages/` or Ta5d6ff`apps/` directories |
| **Microservices** | Multiple Dockerfiles, service directories, API gateway config |
| **Frontend + Backend** | Separate Ta5d6ff`client/`/Ta5d6ff`server/` or Ta5d6ff`frontend/`/Ta5d6ff`backend/` directories |
| **Library/Package** | Ta5d6ff`setup.py`, Ta5d6ff`lib/` directory, published package config |
| **MVC** | Ta5d6ff`models/`, Ta5d6ff`views/`, Ta5d6ff`controllers/` directories |
| **Layered** | Ta5d6ff`domain/`, Ta5d6ff`application/`, Ta5d6ff`infrastructure/`, Ta5d6ff`presentation/` directories |

Tff7b723. **Map module structure**: For monorepos and multi-module projects:
Tff7b72- Identify each module/package/service and its purpose
Tff7b72- Detect inter-module dependencies (imports, shared types)
Tff7b72- Note module boundaries (what code belongs where)
Tff7b72- Identify shared libraries or utilities

Tff7b724. **Extract conventions**: Detect existing coding patterns:
Tff7b72- **Naming**: File naming (camelCase, kebab-case, snake_case), directory naming
Tff7b72- **Branching**: Existing branch names and patterns from Ta5d6ff`git branch -a`
Tff7b72- **Commit style**: Recent commit message patterns from Ta5d6ff`git log --oneline -20`
Tff7b72- **Testing**: Test file location (Ta5d6ff`__tests__/`, Ta5d6ff`*_test.go`, Ta5d6ff`test_*.py`), test naming
Tff7b72- **Documentation**: README structure, inline docs, API docs

Tff7b725. **Detect existing governance**: Check for files that indicate existing project standards:
Tff7b72- Ta5d6ff`CONTRIBUTING.md`, Ta5d6ff`ARCHITECTURE.md`, Ta5d6ff`ADR/` (Architecture Decision Records)
Tff7b72- Ta5d6ff`.editorconfig`, linter configs (Ta5d6ff`.eslintrc`, Ta5d6ff`.flake8`, Ta5d6ff`rustfmt.toml`)
Tff7b72- Ta5d6ff`CLAUDE.md`, Ta5d6ff`AGENTS.md`, Ta5d6ff`.specify/` (existing spec-kit setup)

Tff7b726. **Output project profile**:

Ta5d6ff ```Ta5d6ffmarkdown
# Project Profile

## Tech Stack
| Category | Detected |
|----------|----------|
| **Primary language** | TypeScript (68%), Python (32%) |
| **Frontend** | React 18, Vite, TailwindCSS |
| **Backend** | FastAPI, SQLAlchemy, PostgreSQL |
| **Testing** | Jest (frontend), pytest (backend) |
| **CI/CD** | GitHub Actions |
| **Package manager** | npm (frontend), pip (backend) |

## Architecture
Tff7b72- **Pattern**: Frontend + Backend (separated)
Tff7b72- **Frontend**: Ta5d6ff`client/` β€” React SPA
Tff7b72- **Backend**: Ta5d6ff`server/` β€” FastAPI REST API
Tff7b72- **Database**: PostgreSQL (via SQLAlchemy ORM)

## Module Map
| Module | Path | Purpose | Dependencies |
|--------|------|---------|-------------|
| Frontend | Ta5d6ff`client/` | React SPA | Backend API |
| Backend | Ta5d6ff`server/` | REST API | Database |
| Shared | Ta5d6ff`shared/` | Type definitions | β€” |

## Conventions
Tff7b72- **File naming**: kebab-case (frontend), snake_case (backend)
Tff7b72- **Branch pattern**: Ta5d6ff`feat/*`, Ta5d6ff`fix/*`, Ta5d6ff`chore/*`
Tff7b72- **Commit style**: Conventional Commits
Tff7b72- **Test location**: Ta5d6ff`__tests__/` (frontend), Ta5d6ff`tests/` (backend)

## Existing Governance
Tff7b72- βœ… CONTRIBUTING.md
Tff7b72- βœ… .eslintrc.json
Tff7b72- ❌ ARCHITECTURE.md
Tff7b72- ❌ .specify/ (no spec-kit setup)

## Recommendations
Tff7b72- Run Ta5d6ff`/speckit.brownfield.bootstrap` to generate tailored spec-kit configuration
Tff7b72- Constitution should enforce: kebab-case files (frontend), snake_case (backend)
Tff7b72- Feature specs should map to the frontend/backend split
Ta5d6ff ```

Tc9d1d9## Rules

Tff7b72- **Read-only** β€” this command never modifies any files
Tff7b72- **Respect .gitignore** β€” never scan Ta5d6ff`node_modules/`, Ta5d6ff`vendor/`, Ta5d6ff`dist/`, Ta5d6ff`.venv/`, or other ignored directories
Tff7b72- **Proportional analysis** β€” report language percentages based on actual file counts or line counts
Tff7b72- **No assumptions** β€” only report what is actually detected in the codebase
Tff7b72- **Handle empty results** β€” if a category has nothing detected, say "Not detected" rather than guessing

Served by rngit 1.5.4 - Generated in 0.05s